/*
 * @Author: your name
 * @Date: 2022-01-06 09:45:04
 * @LastEditTime: 2022-01-08 22:24:14
 * @LastEditors: Please set LastEditors
 * @Description: 路由
 * @FilePath: \homepage\src\router\index.js
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [{
        path: '/',
        redirect: "/index"
    },
    {
        path: '/index',
        name: 'index',
        component: () =>
            import ('@/views/index.vue')
    },
    {
        path: '/detail',
        name: 'detail',
        component: () =>
            import ('@/views/detail')
    },

    {
        path: '/page',
        name: 'page',
        component: () =>
            import ('@/views/page')
    },

    {
        path: '/agents',
        name: 'agents',
        component: () =>
            import ('../views/agents')
    },

    // 地产分类
    {
        path: '/category',
        name: 'Category',
        component: () =>
            import ('@/views/category')
    },
    // 地产列表
    {
        path: '/property/:id',
        name: 'property',
        component: () =>
            import ('@/views/property')
    },
    // 地产列表
    {
        path: '/property',
        name: 'Property',
        component: () =>
            import ('@/views/property')
    },
    {
        path: '/property',
        name: 'property',
        component: () =>
            import ('@/views/property')
    },
    {
        path: '/detail/:id',
        name: 'detail',
        component: () =>
            import ('@/views/detail')
    }
]




const router = new VueRouter({
    routes
})


export default router